<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function perfectNumber(number) {
        let result = 0;
        for (let i = 1; i < number; i++) {
            if (number % i === 0) {
                result += i;
            }
        }
        return result;
    }

    for (let i = 1; i <= 100; i++) {
        if (i < perfectNumber(i)){
            console.log("盈数:"+i);
        }
    }
</script>
</body>
</html>